const Model = require("../../models");

module.exports = {
  name: "valid_faild",

  async add(data) {
    try {
      const res = await Model.models.valid_faild.core.create(data);
      return { ok: 1, data: res };
    } catch (e) {
      console.log(e);
      return { ok: 0 };
    }
  },

  async get_reason(query) {
    try {
      const res = await Model.models.valid_faild.core.findOne({ where: query });
      return { ok: 1, data: res };
    } catch (e) {
      console.log(e);
      return { ok: 0 };
    }
  },
};
